import java.util.Arrays;

/**
* @description: 面试题 01.02. 判定是否互为字符重排
* @author hewei
* @date 2022/9/27 14:11
* @version 1.0
*/

public class CheckPermutation {

    public boolean CheckPermutation(String s1, String s2) {
        char[] chars1 = s1.toCharArray();
        char[] chars2 = s2.toCharArray();
        Arrays.sort(chars1);
        Arrays.sort(chars2);
        return String.valueOf(chars1).equals(String.valueOf(chars2));
    }
}
